package com.atguigu.tingshu.common.config;

import org.redisson.Redisson;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 草稿配置
 *
 * @author ym
 * @date 2025/06/27 23:10
 */
@Configuration
public class RedissonConfig {

    /**
     * 客户编辑
     *
     * @return {@link RedissonClient}
     */
    @Bean
    public RedissonClient redissonClient() {
        Config config = new Config();
        config.useSingleServer().setAddress("redis://192.168.254.156:6379"); // 修改为你的 Redis 地址
        return Redisson.create(config);
    }
}
